<template>
  <view>
    <view
      class="head t_c pa_0"
      :style="'background:' + color"
      style="
        display: flex;
        padding: 20rpx 2.5%;
        justify-content: space-between;
        width: 100%;
        align-items: center;
      "
    >
      <view>
        <view class="fon_24 color_e">累计收益佣金(元)</view>
        <view class="fon_40 color_f">{{ yjdata.ljyj }}</view>
      </view>

      <view
        @tap="detaulted"
        style="
          width: 200rpx;
          padding: 10rpx 0;
          border-radius: 30rpx;
          border: 1px solid #fff;
          color: #fff;
        "
      >
        <text class="fon_30" style="color: #fff">佣金明细</text>
      </view>
    </view>
    <view
      style="
        width: 100%;
        display: flex;
        justify-content: space-between;
        background: #fff;
        padding: 20rpx;
        margin-bottom: 20rpx;
        color: #333;
      "
    >
      <view>可提现佣金(元)</view>
      <view>{{ yjdata.ktxyj }}</view>
    </view>
    <view style="width: 100%; margin-bottom: 20rpx">
      <view
        style="
          width: 100%;
          display: flex;
          justify-content: space-between;
          background: #fff;
          padding: 20rpx;
          color: #333;
        "
      >
        <view>已提现佣金(元)</view>
        <view>{{ yjdata.ytxyj }}</view>
      </view>
      <view
        style="
          width: 100%;
          display: flex;
          justify-content: space-between;
          background: #fff;
          padding: 20rpx;
          color: #333;
        "
      >
        <view>已申请佣金(元)</view>
        <view>{{ yjdata.ddkyj }}</view>
      </view>
    </view>
    <view @tap="detaulted" class="pa ba_ff mar_t list bor_bottom rel">
      <image
        class="dis_in"
        mode="aspectFit"
        src="https://yunkeososyunchuc.bc8t.cn/ymq_canyino2o/static/mx.png"
      ></image>
      <text class="dis_in fon_30">佣金明细</text>
      <image
        class="ab ud"
        mode="aspectFill"
        src="https://yunkeososyunchuc.bc8t.cn/ymq_canyino2o/static/blackjt.png"
      ></image>
    </view>
    <!-- <view @tap="detault" class="pa ba_ff list rel">
      <image
        class="dis_in"
        mode="aspectFit"
        src="./static/distribution/tx.png"
      ></image>
      <text class="dis_in fon_30">提现记录</text>
      <image
        class="ab ud"
        mode="aspectFill"
        src="https://yunkeososyunchuc.bc8t.cn/ymq_canyino2o/static/blackjt.png"
      ></image>
    </view> -->
    <view
      class="btn"
      :style="'background:' + color"
      style="
        display: flex;
        justify-content: center;
        padding: 20rpx 0;
        border-radius: 40rpx;
        width: 95%;
        margin: 40rpx auto;
        color: #fff;
      "
    >
      <text>提现</text>
    </view>
  </view>
</template>

<script>
import cardlist from '@/ymq_canyino2o/dist/cardlist/index'
import gettel from '@/ymq_canyino2o/dist/gettel/index'
var app = getApp()
export default {
  components: {
    cardlist,
    gettel
  },
  data() {
    return {
      color: '#459cf9',

      yjdata: {
        ktxyj: '',
        ljyj: '',
        ddkyj: '',
        ytxyj: ''
      }
    }
  },
  onLoad: function (t) {
    app.globalData.setNavigationBarColor(this)
    var that = this
    var n = uni.getStorageSync('users').id
    app.globalData.util.request({
      url: 'entry/wxapp/MyCommission',
      cachetime: '0',
      data: {
        user_id: n
      },
      success: function (t) {
        console.log(t.data)
        that.setData({
          yjdata: t.data
        })
      }
    })
  },
  onReady: function () {},
  onShow: function () {},
  onHide: function () {},
  onUnload: function () {},
  onPullDownRefresh: function () {},
  onReachBottom: function () {},
  methods: {
    detaulted: function (t) {
      uni.navigateTo({
        url: 'detaulted'
      })
    },

    detault: function (t) {
      uni.navigateTo({
        url: 'detault'
      })
    }
  }
}
</script>
<style>
@import './distribution.css';
</style>
